﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        if (!!keyValue) {
            $.ajax({
                url: "/WorkFlowSetting/FormDesigner/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/WorkFlowSetting/FormDesigner/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>

<form id="form1">
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">
            <tr>
                <th class="formTitle">表单名称</th>
                <td class="formValue">
                    <input id="F_Name" name="F_Name" type="text" class="form-control required" placeholder="请录入表单名称" />
                </td>
                <th class="formTitle">表单分类</th>
                <td class="formValue">
                    <input id="F_Type" name="F_Type" type="text" class="form-control required" placeholder="请录入表单分类" />
                </td>
            </tr>

            <tr>
                <th class="formTitle">相关属性</th>
                <td class="formValue">
                    <input id="F_Attribute" name="F_Attribute" type="text" class="form-control required" placeholder="请录入相关属性" />
                </td>
                <th class="formTitle">表单排序</th>
                <td class="formValue">
                    <input id="F_Sort" name="F_Sort" type="text" class="form-control required" placeholder="请录入表单排序" />
                </td>
                
            </tr>
            <tr>
                <th class="formTitle" style="height: 35px;">状态</th>
                <td class="formValue" colspan="3" style="padding-top: 1px;">
                    @*<input id="F_Status" name="F_Status" type="text" class="form-control required" placeholder="请录入状态" />*@
                    @*0保存 1 编译 2 作废*@
                    <div class="rdio">
                        <input id="F_Status1" name="F_Status" type="radio" value="0" checked="checked"><label for="F_Status1">保存</label>
                    </div>
                    <div class="rdio">
                        <input id="F_Status2" name="F_Status" type="radio" value="1"><label for="F_Status2">编译</label>
                    </div>
                    <div class="rdio">
                        <input id="F_Status3" name="F_Status" type="radio" value="2"><label for="F_Status3">作废</label>
                    </div>
                </td>
            </tr>
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">
                    从表设置数据
                </th>
                <td class="formValue" colspan="3">
                    <textarea id="F_SubTableJson" name="F_SubTableJson" class="form-control" style="height: 100px;" placeholder="请录入从表设置数据"></textarea>
                </td>
            </tr>
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">
                    事件设置
                </th>
                <td class="formValue" colspan="3">
                    <textarea id="F_EventsJson" name="F_EventsJson" class="form-control" style="height: 160px;" placeholder="请录入事件设置"></textarea>
                </td>
            </tr>
        </table>
    </div>
</form>


